-- GENERATED SPELL FOR [Elder Mottled Boar] --


function spell0_3100(pUnit, Event) --@Bite,n/a--
pUnit:FullCastSpellOnTarget(17255,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3100', 675, 1)
end

function spell1_3100(pUnit, Event) --@Boar Charge,Self--
pUnit:FullCastSpellOnTarget(3385,pUnit)
pUnit:RegisterEvent('Sorts_3100', 4000, 1)
end

function spell2_3100(pUnit, Event) --@Cower,n/a--
pUnit:FullCastSpellOnTarget(1742,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3100', 0, 1)
end

function spell3_3100(pUnit, Event) --@Gore,n/a--
pUnit:FullCastSpellOnTarget(35290,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3100', 0, 1)
end

function spell4_3100(pUnit, Event) --@Growl,n/a--
pUnit:FullCastSpellOnTarget(2649,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3100', 0, 1)
end

function spell5_3100(pUnit, Event) --@Growl,n/a--
pUnit:FullCastSpellOnTarget(14916,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3100', 0, 1)
end

function Sorts_3100(pUnit, Event)
local choix_sorts_3100 = math.random(0, 5)
if choix_sorts_3100 == 0 then
pUnit:RegisterEvent('spell0_3100', 1, 1)
end
if choix_sorts_3100 == 1 then
pUnit:RegisterEvent('spell1_3100', 1, 1)
end
if choix_sorts_3100 == 2 then
pUnit:RegisterEvent('spell2_3100', 1, 1)
end
if choix_sorts_3100 == 3 then
pUnit:RegisterEvent('spell3_3100', 1, 1)
end
if choix_sorts_3100 == 4 then
pUnit:RegisterEvent('spell4_3100', 1, 1)
end
if choix_sorts_3100 == 5 then
pUnit:RegisterEvent('spell5_3100', 1, 1)
end
end

function mob3100_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_3100', math.random(1500, 3000), 1)
end

function mob3100_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3100_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3100_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(3100, 1, 'mob3100_Action')
RegisterUnitEvent(3100, 2, 'mob3100_Leave')
RegisterUnitEvent(3100, 3, 'mob3100_Kill')
RegisterUnitEvent(3100, 4, 'mob3100_Die')
